// This file was decompiled using VCSCM.ini published on 2021-01-30
{$CLEO .cs}

03A4: script_name 'R_GUARD' 
0006: 5@ = 0 // @ = int 
0006: 14@ = 0 // @ = int 
0004: $3961 = 0 // $ = int 
0002: jump @R_GUARD_222 

:R_GUARD_38
0001: wait 100 ms 
0223: set_actor 4@ health_to 250 
00D6: if and
04C4: create_coordinate 10@ 11@ 12@ from_actor $player_actor offset 1.5 1.5 0.0 
05EF: 6@ = random_actor_near_point 10@ 11@ 12@ in_radius 30.0 find_next 0 pass_deads 0 //IF and SET 
004D: jump_if_false @R_GUARD_222 
00D6: if or
02F2:   actor 6@ model == #GANG01 
02F2:   actor 6@ model == #GANG02 
02F2:   actor 6@ model == #GANG03 
02F2:   actor 6@ model == #GANG04 
02F2:   actor 6@ model == #GANG05 
02F2:   actor 6@ model == #GANG06 
02F2:   actor 6@ model == #GANG07 
02F2:   actor 6@ model == #GANG08 
004D: jump_if_false @R_GUARD_222 
0372: set_actor 4@ anim 0 wait_state_time 100 ms 
01CB: actor 4@ kill_actor 6@ 
0223: set_actor 4@ health_to 250 
0001: wait 4000 ms 
0372: set_actor 4@ anim 14 wait_state_time 1000000 ms 

:R_GUARD_222
0001: wait 0 ms 
00D6: if and
00E0:   player $player_char in_any_car 
84C9:   not player $player_char in_flying_vehicle 
847E:   not player $player_char on_any_bike 
84A8:   not player $player_char in_any_boat 
004D: jump_if_false @R_GUARD_514 
00D6: if 
0039:   5@ == 0 // @ == int 
004D: jump_if_false @R_GUARD_38 
00D6: if 
0039:   14@ == 0 // @ == int 
004D: jump_if_false @R_GUARD_300 
0002: jump @R_GUARD_222 

:R_GUARD_300
00D6: if and
04C4: create_coordinate 10@ 11@ 12@ from_actor $player_actor offset 0.0 0.0 0.0 
05EF: 4@ = random_actor_near_point 10@ 11@ 12@ in_radius 3.0 find_next 0 pass_deads 0 //IF and SET 
004D: jump_if_false @R_GUARD_222 
00D6: if or
02F2:   actor 4@ model == #GANG13 
02F2:   actor 4@ model == #GANG14 
004D: jump_if_false @R_GUARD_222 
0004: $3961 = 1 // $ = int 
0006: 5@ = 1 // @ = int 
03CF: load_wav 'bud2_1' as 1 
0001: wait 10 ms 
03C1: 3@ = player $player_char car_no_save 
0464: put_actor 4@ into_turret_on_car 3@ at_car_offset 0.9 0.3 0.4 position 0 angle 359.0 with_weapon 25 
0001: wait 500 ms 
0372: set_actor 4@ anim 14 wait_state_time 1000000 ms 

:R_GUARD_475
0001: wait 100 ms 
00D6: if 
03D0:   wav 1 loaded 
004D: jump_if_false @R_GUARD_475 
03D1: play_wav 1 
0001: wait 2000 ms 
040D: unload_wav 1 
0002: jump @R_GUARD_222 

:R_GUARD_514
00D6: if 
0039:   5@ == 1 // @ == int 
004D: jump_if_false @R_GUARD_698 
0001: wait 0 ms 
0465: remove_actor 4@ from_turret_mode 
0004: $3961 = 0 // $ = int 
0001: wait 0 ms 
00A0: store_actor 4@ position_to 10@ 11@ 12@ 
00D6: if 
02F2:   actor 4@ model == #GANG13 
004D: jump_if_false @R_GUARD_618 
009B: destroy_actor_instantly 4@ 
0001: wait 0 ms 
009A: 4@ = create_actor_pedtype 13 model #GANG13 at 10@ 11@ 12@ 
0002: jump @R_GUARD_645 

:R_GUARD_618
009B: destroy_actor_instantly 4@ 
0001: wait 0 ms 
009A: 4@ = create_actor_pedtype 13 model #GANG14 at 10@ 11@ 12@ 

:R_GUARD_645
0001: wait 100 ms 
01C2: mark_actor_as_no_longer_needed 4@ 
01B2: give_actor 4@ weapon 25 ammo 2000 // Load the weapon model before using this 
02E2: set_actor 4@ weapon_accuracy_to 99 
0223: set_actor 4@ health_to 250 
01DF: tie_actor 4@ to_player $player_char 
0006: 5@ = 0 // @ = int 
0001: wait 100 ms 

:R_GUARD_698
00D6: if and
04C4: create_coordinate 10@ 11@ 12@ from_actor $player_actor offset 1.5 1.5 0.0 
05EF: 4@ = random_actor_near_point 10@ 11@ 12@ in_radius 3.0 find_next 0 pass_deads 0 //IF and SET 
004D: jump_if_false @R_GUARD_222 
0006: 5@ = 0 // @ = int 
00D6: if 
0038:   $onmission == 0 // $ == int 
004D: jump_if_false @R_GUARD_826 
00D6: if or
02F2:   actor 4@ model == #GANG13 
02F2:   actor 4@ model == #GANG14 
004D: jump_if_false @R_GUARD_826 
00BC: text_highpriority 'hiregng' time 1000 1 

:R_GUARD_826
00D6: if and
00E1:   player 0 pressed_button 16 
00E1:   player 0 pressed_button 4 
004D: jump_if_false @R_GUARD_910 
00D6: if 
0320:   actor 4@ in_range_of_player $player_char 
004D: jump_if_false @R_GUARD_222 
01E0: clear_leader 4@ 
000E: 14@ -= 1 // @ -= int 
018C: play_sound 13 at 10@ 11@ 12@ 
01C2: mark_actor_as_no_longer_needed 4@ 
0001: wait 500 ms 
0002: jump @R_GUARD_222 

:R_GUARD_910
00D6: if and
00E1:   player 0 pressed_button 15 
00E1:   player 0 pressed_button 4 
004D: jump_if_false @R_GUARD_222 
01B4: set_player $player_char can_move 0 
0001: wait 50 ms 
01B4: set_player $player_char can_move 1 
0001: wait 0 ms 
00D6: if 
0320:   actor 4@ in_range_of_player $player_char 
004D: jump_if_false @R_GUARD_985 
0001: wait 0 ms 
0002: jump @R_GUARD_222 

:R_GUARD_985
00D6: if or
02F2:   actor 4@ model == #GANG13 
02F2:   actor 4@ model == #GANG14 
004D: jump_if_false @R_GUARD_222 
02E2: set_actor 4@ weapon_accuracy_to 99 
0223: set_actor 4@ health_to 250 
01DF: tie_actor 4@ to_player $player_char 
000A: 14@ += 1 // @ += int 
018C: play_sound 13 at 10@ 11@ 12@ 
0209: 1@ = random_int_in_ranges 1 5 
0247: request_model #SHOTGUN 
0247: request_model #AK47 
0247: request_model #UZI 
0247: request_model #TEC9 
038B: load_requested_models 
00D6: if 
0039:   1@ == 1 // @ == int 
004D: jump_if_false @R_GUARD_1192 
03CF: load_wav 'tax1_4' as 1 
0470: 2@ = actor 4@ armed_weapon 
00D6: if or
0039:   2@ == 25 // @ == int 
0039:   2@ == 21 // @ == int 
0039:   2@ == 22 // @ == int 
0039:   2@ == 23 // @ == int 
004D: jump_if_false @R_GUARD_1168 
0002: jump @R_GUARD_1491 

:R_GUARD_1168
01B2: give_actor 4@ weapon 25 ammo 2000 // Load the weapon model before using this 
01B9: set_actor 4@ armed_weapon_to 25 
0002: jump @R_GUARD_1491 

:R_GUARD_1192
00D6: if 
0039:   1@ == 2 // @ == int 
004D: jump_if_false @R_GUARD_1300 
03CF: load_wav 'porn1_8' as 1 
0470: 2@ = actor 4@ armed_weapon 
00D6: if or
0039:   2@ == 25 // @ == int 
0039:   2@ == 21 // @ == int 
0039:   2@ == 22 // @ == int 
0039:   2@ == 23 // @ == int 
004D: jump_if_false @R_GUARD_1276 
0002: jump @R_GUARD_1491 

:R_GUARD_1276
01B2: give_actor 4@ weapon 21 ammo 2000 // Load the weapon model before using this 
01B9: set_actor 4@ armed_weapon_to 21 
0002: jump @R_GUARD_1491 

:R_GUARD_1300
00D6: if 
0039:   1@ == 3 // @ == int 
004D: jump_if_false @R_GUARD_1408 
03CF: load_wav 'resc_1' as 1 
0470: 2@ = actor 4@ armed_weapon 
00D6: if or
0039:   2@ == 25 // @ == int 
0039:   2@ == 21 // @ == int 
0039:   2@ == 22 // @ == int 
0039:   2@ == 23 // @ == int 
004D: jump_if_false @R_GUARD_1384 
0002: jump @R_GUARD_1491 

:R_GUARD_1384
01B2: give_actor 4@ weapon 22 ammo 2000 // Load the weapon model before using this 
01B9: set_actor 4@ armed_weapon_to 22 
0002: jump @R_GUARD_1491 

:R_GUARD_1408
03CF: load_wav 'bud2_2' as 1 
0470: 2@ = actor 4@ armed_weapon 
00D6: if or
0039:   2@ == 25 // @ == int 
0039:   2@ == 21 // @ == int 
0039:   2@ == 22 // @ == int 
0039:   2@ == 23 // @ == int 
004D: jump_if_false @R_GUARD_1474 
0002: jump @R_GUARD_1491 

:R_GUARD_1474
01B2: give_actor 4@ weapon 23 ammo 2000 // Load the weapon model before using this 
01B9: set_actor 4@ armed_weapon_to 23 

:R_GUARD_1491
0249: release_model #SHOTGUN 
0249: release_model #AK47 
0249: release_model #UZI 
0249: release_model #INGRAMSL 

:R_GUARD_1511
0001: wait 100 ms 
00D6: if 
03D0:   wav 1 loaded 
004D: jump_if_false @R_GUARD_1511 
03D1: play_wav 1 
0001: wait 2000 ms 
040D: unload_wav 1 
0002: jump @R_GUARD_222 
